export function togo(url,data){
	url += (url.indexOf('?') < 0 ? '?' : '&') + param(data)
	uni.getStorageSync('goPath')
	console.log(uni.getStorageSync('goPath'))
	if(uni.getStorageSync('goPath')){
		uni.setStorageSync('goPath',false)
		uni.navigateTo({
			url,
			success() {
				uni.setStorageSync('goPath',true)
			}
		}) 
	}
}
 
export function param(data) {
  let url = ''
  for (var k in data) {
    let value = data[k] !== undefined ? data[k] : ''
    url += '&' + k + '=' + encodeURIComponent(value)
  }
  return url ? url.substring(1) : ''
}
 
